

import React, { useState,useEffect } from 'react';
import { Button, Checkbox, Form, Input, DatePicker, Space, Select } from 'antd';
import "./Pingjia.scss"
import Banjian_List from "../../../components/Response列表/Banjian_List"
import { useNavigate } from 'react-router-dom'
import * as service from "../../../api/index"
interface Props {

}
function Pingjia(props: Props) {
    var navigate = useNavigate();

    const list= async ()=>{
        // var res= await service.banshi_list()
        // console.log(res)
    }
    useEffect(()=>{
        list()
    },[])
    
      
    const { Option } = Select;
    type SizeType = Parameters<typeof Form>[0]['size'];
    const onFinish = (values: any) => {
        console.log('Success:', values);
    };
    const { RangePicker } = DatePicker;
    const onFinishFailed = (errorInfo: any) => {
        console.log('Failed:', errorInfo);
    };
    const [form] = Form.useForm();
    const onGenderChange = (value: string) => {
        switch (value) {
            case 'male':
                form.setFieldsValue({ note: 'Hi, man!' });
                break;
            case 'female':
                form.setFieldsValue({ note: 'Hi, lady!' });
                break;
            case 'other':
                form.setFieldsValue({ note: 'Hi there!' });
                break;
            default:
        }
    };

    //跳转添加
    
    //去新增

    return (
        <div className='Guanli'>
          <div className='biaodan'>
                <Form
                    name="basic"
                    initialValues={{ remember: true }}
                    onFinish={onFinish}
                    onFinishFailed={onFinishFailed}
                    autoComplete="off"
                >
                    <Form.Item
                        label="评价事项"
                        name="shixiang"
                        
                    >
                        <Input />
                    </Form.Item>
                    <Form.Item
                        label="事项编码"
                        name="bianma"
                      
                    >
                        <Input />
                    </Form.Item>
                    <Form.Item
                        label="评价人姓名"
                        name="name"
                       
                    >
                        <Input />
                    </Form.Item>
                    <Form.Item name="gender" label="评价结果" >
                        <Select
                            placeholder="请选择"
                            onChange={onGenderChange}
                            allowClear
                        >
                            <Option value="one">非常不满意</Option>
                            <Option value="two">不满意</Option>
                            <Option value="there">满意</Option>
                            <Option value="four">非常满意</Option>
                        </Select>
                    </Form.Item>
                    <Form.Item  name="time" label="评价时间">
                        <RangePicker />
                    </Form.Item>
               
                    <Form.Item wrapperCol={{ offset: 8, span: 16 }}>
                        <Button type="primary" htmlType="submit">
                          查询
                        </Button>
                        <Button type="primary" htmlType="submit">
                           重置
                        </Button>
                    </Form.Item>
                  

    
                </Form>

          </div>
             <div>
               <Banjian_List/>
             </div>

        </div>
    );
}

export default Pingjia;